@extends('layouts.default')
@section('content')
    <div class="container">
        <div class="row row-display row-centered">
            <div class="col-md-6 col-centered">
                <!-- /.box-header -->
                <!-- form start -->
                <form role="form" action="{{route('roles.update', $role->id)}}" method="post">
                    {{ method_field('PATCH') }}
                    {{ csrf_field() }}
                    <div class="box-body">
                        <div class="form-group">
                            <label>角色名</label>
                            <input type="text" class="form-control" name="name" value="" placeholder="{{$role->name}}">
                        </div>
                        <div class="form-group">
                            <label>显示名称</label>
                            <input type="text" class="form-control" name="display_name" value="" placeholder="{{$role->display_name}}">
                        </div>
                        <div class="form-group">
                            <label>描述</label>
                            <textarea class="form-control" rows="3" name="description">{{$role->description}}</textarea>
                        </div>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <button type="submit" class="btn btn-primary pull-left">保存</button>
                        <a href="{{ url()->previous() }}" class="btn btn-primary pull-right">返回</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
@stop